package com.chucang.shucang.ttp.messagecenter.strategy;

import com.chucang.shucang.common.mq.message.SmsCodeMessage;
import com.chucang.shucang.ttp.messagecenter.enums.MESSAGE_TYPE;
import lombok.Data;

/**
 * @author flitsneak
 * @email flitsneak@gmail.com
 * @date 2022/9/26 17:56
 * @description 策略上下文
 */
@Data
public class MessageContext {

    private MessageStrategy messageStrategy;

    public boolean sendMessage(MESSAGE_TYPE messageType, SmsCodeMessage smsCodeMessage) {
        return messageStrategy.sendMessage(messageType, smsCodeMessage);
    }
}
